import request from './request'
const baseUrl = 'http://kumanxuan1.f3322.net:8360'

// 登录接口
export const LoginApi = (data) => request.post(baseUrl + '/admin/auth/login', data)
// 在用户已登录过的时候，刷新自动获取token
export const getUserByToken = (data) => request.post(baseUrl + '/admin/auth/getUserByToken', data)

// 商品列表api
export const GetGoodsList = (params) => request.get(baseUrl + '/admin/goods', { params })

// 图片上传api
export const UploadImgApi = (data) => request.post(baseUrl + '/admin/upload/goodNewPic', data)

// 添加/编辑的接口
export const PostGoodsInfo = (data) => request.post(baseUrl + '/admin/goods/store', data)

// 添加/编辑分类的接口
export const PostCategoryInfo = (data) => request.post(baseUrl + '/admin/category/store', data)

// 商品详情
export const GetGoodsInfo = (params) => request.get(baseUrl + '/admin/goods/info', { params })

// 分类详情
export const GetCategoryInfo = (params) => request.get(baseUrl + '/admin/category/info', { params })

// 分类
export const GetCategory = (params) => request.get(baseUrl + '/admin/category', { params })

// 顶级分类
export const GetTopCategory = (params) => request.get(baseUrl + '/admin/category/topCategory', { params })


// 品牌分类
export const GetBrand = (params) => request.get(baseUrl + '/admin/brand', { params })

// 添加品牌
export const PostBrandInfo = (data) => request.post(baseUrl + '/admin/brand/store', data)

// 获取品牌信息
export const GetBrandInfo = (params) => request.get(baseUrl + '/admin/brand/info', { params })


// 订单列表
export const GetOrder = (params) => request.get(baseUrl + '/admin/order', { params })

// 专题数据
export const GetTopic = (params) => request.get(baseUrl + '/admin/topic', { params })

// 属性列表数据
export const GetAttribute = (params) => request.get(baseUrl + '/admin/attribute', { params })




